<?php include "../public/header.php";?>
<?php include "../public/header_show.php";?>
<style>
    .danbut{border: 1px solid #eee;padding: 0 20px 10px}
    .danbut button{margin-top: 10px;margin-right:10px;background-color: #FFFFFF;color: #777;border: 1px solid #ccc}
    .danbut button:hover{background-color: #2272eb;color: #FFFFFF;border: 1px solid #2272eb}
    .danbut button.active{background-color: #2272eb;color: #FFFFFF;border: 1px solid #2272eb}
    .relss{border: 1px solid #eee;}
    .tabfenge{height: 30px;border-top: 1px solid #eee;border-bottom: 1px solid #eee}
    .layui-laypage-default{float: right}
</style>
<body id="xiangqingPage">
<div id="xiangqingBox">
    <div class="page-title">
        <div class="page-title-con">
            <span class="pageshowtitle">详情</span>
            <div class="page-title-opt-list">
                <?php include "../public_flow/flow_show_optbut.php";?>
                <button class="layui-btn layui-btn-sm btn-light marginr5 opt">
                    操作<i class="layui-icon layui-icon-down layui-font-12"></i>
                </button>
                <span id="page-close" class="page-close" onclick="layer_close()">×</span>
            </div>
        </div>
    </div>
    <div class="main-container">
        <div class="tongbox tongbox4">
            <div class="tuo">
                <div class="tit">项目名称</div>
                <div class="con" id="tong_name"></div>
            </div>
            <div class="tuo">
                <div class="tit">建设单位</div>
                <div class="con" id="tong_jian_unit"></div>
            </div>
            <div class="tuo">
                <div class="tit">工程造价(万元)</div>
                <div class="con" id="tong_expectfee"></div>
            </div>
            <div class="tuo">
                <div class="tit">施工合同金额(元)</div>
                <div class="con colorlan" id="tong_shi_money"></div>
            </div>
        </div>
        <div class="danbut" id="danbut">
            <button class="layui-btn layui-btn-sm active" key="engin" type="button">项目概况</button>
            <button class="layui-btn layui-btn-sm" key="contract_shi_show" type="button">施工合同</button>
            <button class="layui-btn layui-btn-sm" key="contract_cai_show" type="button">采购合同</button>
            <button class="layui-btn layui-btn-sm" key="piao_show" type="button">发票</button>
            <button class="layui-btn layui-btn-sm" key="shoufu_show" type="button">收付款</button>
            <button class="layui-btn layui-btn-sm" key="payment_neikou_show" type="button">扣款</button>
            <button class="layui-btn layui-btn-sm" key="payment_xiangfu_show" type="button">结算支付</button>
            <button class="layui-btn layui-btn-sm" key="xiangfei_show" type="button">项目费用</button>
            <button class="layui-btn layui-btn-sm" key="engin_jinghui_show" type="button">项目经营汇总</button>
            <button class="layui-btn layui-btn-sm" key="stamp_show" type="button">盖章资料</button>
        </div>


        <div class="relss rel_info_engin">
            <div class="table-box tablenes">
                <div class="title">基本信息</div>
                <table class="layui-table">
                    <tbody>
                    <tr><td class="tt">项目名称</td><td class="tv" id="name"></td><td class="tt">项目编号</td><td class="tv" id="number"></td></tr>
                    <tr><td class="tt">资质类型</td><td class="tv" id="engintype"></td><td class="tt">委托方</td><td class="tv" id="lian_unit"></td></tr>
                    <tr><td class="tt">建设单位</td><td class="tv" id="jian_unit"></td><td class="tt">项目所属单位</td><td class="tv" id="chanid_name"></td></tr>
                    <tr><td class="tt">所在地</td><td class="tv" id="areas"></td><td class="tt">详细地址</td><td class="tv" id="addr"></td></tr>
                    <tr><td class="tt">工程造价(元)</td><td class="tv" id="expectfee"></td><td class="tt">工期(天)</td><td class="tv" id="duration"></td></tr>
                    <tr><td class="tt">开工日期</td><td class="tv" id="startdt"></td><td class="tt">竣工日期</td><td class="tv" id="enddt"></td></tr>
                    <tr><td class="tt">招标方式</td><td class="tv" id="zhaotype"></td><td class="tt">招标代理机构</td><td class="tv" id="zhaounit"></td></tr>
                    <tr><td class="tt">项目状态</td><td class="tv" id="state_name"></td><td class="tt">业务对接人</td><td class="tv" id="man_xiang_name"></td></tr>
                    <tr class="layui-hide zhaninfo"><td class="tt">管理费费率(%)</td><td class="tv" id="guanrate"></td><td class="tt">成本票提交比例(%)</td><td class="tv" id="piaorate"></td></tr>
                    <tr class="layui-hide zhaninfo"><td class="tt">居间费比例(%)</td><td class="tv" id="jianrate"></td><td class="tt">成本票差额费比例(%)</td><td class="tv" id="charate"></td></tr>
                    <tr id="actualdtDiv" class="layui-hide"><td class="tt">实际开工日期</td><td class="tv" id="actualdt" colspan="3"></td></tr>
                    <tr id="filishdtDiv" class="layui-hide"><td class="tt">竣工验收日期</td><td class="tv" id="filishdt" colspan="3"></td></tr>

                    <tr><td class="tt">备注</td><td class="tv" id="explain" colspan="3"></td></tr>
                    </tbody>
                </table>
            </div>
            <div><?php include "../public/upinfo_show.php";?></div>
            <div><?php include "../public_flow/flow_show_flowrelas.php";?></div>
            <div><?php include "../public_flow/flow_show_info.php";?></div>
            <div><?php include '../public_flow/flow_show_shenlog.php'?></div>
            <div><?php include '../public_flow/flow_show_talk.php'?></div>
            <div><?php include '../public/opt_browse.php'?></div>
        </div>

        <div class="relss layui-hide rel_info_contract_shi_show">
            <div class="table-box tablenes">
                <div class="layui-col-md12" style="border: 1px solid #eee;">
                    <script type="text/html" id="toolbarDemo_contract_shi"><b>施工合同评审</b></script>
                    <table id="datalist_contract_shi" lay-filter="datalist_contract_shi"></table>
                </div>
                <div style="clear: both"></div><div class="tabfenge"></div>

                <div class="layui-col-md12" style="border: 1px solid #eee;">
                    <script type="text/html" id="toolbarDemo_contract_shi_jie"><b>施工合同结算</b></script>
                    <table id="datalist_contract_shi_jie" lay-filter="datalist_contract_shi_jie"></table>
                </div>
            </div>
            <div style="clear: both"></div>
        </div>

        <div class="relss layui-hide rel_info_contract_cai_show">
            <div class="table-box tablenes">
                <div class="layui-col-md12" style="border: 1px solid #eee;">
                    <script type="text/html" id="toolbarDemo_contract_cai"><b>采购合同评审</b></script>
                    <table id="datalist_contract_cai" lay-filter="datalist_contract_cai"></table>
                </div>
                <div style="clear: both"></div><div class="tabfenge"></div>

                <div class="layui-col-md12" style="border: 1px solid #eee;">
                    <script type="text/html" id="toolbarDemo_contract_cai_jie"><b>采购合同结算</b></script>
                    <table id="datalist_contract_cai_jie" lay-filter="datalist_contract_cai_jie"></table>
                </div>
            </div>
            <div style="clear: both"></div>
        </div>

        <div class="relss layui-hide rel_info_piao_show">
            <div class="table-box tablenes">
                <div class="layui-col-md12" style="border: 1px solid #eee;">
                    <script type="text/html" id="toolbarDemo_piao_kai"><b>开票</b></script>
                    <table id="datalist_piao_kai" lay-filter="datalist_piao_kai"></table>
                </div>
                <div style="clear: both"></div><div class="tabfenge"></div>
                <div class="layui-col-md12" style="border: 1px solid #eee;">
                    <script type="text/html" id="toolbarDemo_piao_shou"><b>收票</b></script>
                    <table id="datalist_piao_shou" lay-filter="datalist_piao_shou"></table>
                </div>
                <div style="clear: both"></div><div class="tabfenge"></div>

                <div class="layui-col-md12" style="border: 1px solid #eee;">
                    <script type="text/html" id="toolbarDemo_piao_engin_hui"><b>项目票税汇总</b></script>
                    <table id="datalist_piao_engin_hui" lay-filter="datalist_piao_engin_hui"></table>
                </div>
            </div>
            <div style="clear: both"></div>
        </div>

        <div class="relss layui-hide rel_info_shoufu_show">
            <div class="table-box tablenes">
                <div class="layui-col-md12" style="border: 1px solid #eee;">
                    <script type="text/html" id="toolbarDemo_income_engin"><b>项目收款</b></script>
                    <table id="datalist_income_engin" lay-filter="datalist_income_engin"></table>
                </div>
                <div style="clear: both"></div><div class="tabfenge"></div>

                <div class="layui-col-md12" style="border: 1px solid #eee;">
                    <script type="text/html" id="toolbarDemo_payment_engin"><b>项目付款</b></script>
                    <table id="datalist_payment_engin" lay-filter="datalist_payment_engin"></table>
                </div>
            </div>
            <div style="clear: both"></div>
        </div>

        <div class="relss layui-hide rel_info_payment_neikou_show">
            <div class="table-box tablenes">
                <div class="layui-col-md12" style="border: 1px solid #eee;">
                    <script type="text/html" id="toolbarDemo_payment_neikou"><b>扣款登记</b></script>
                    <table id="datalist_payment_neikou" lay-filter="datalist_payment_neikou"></table>
                </div>
                <div style="clear: both"></div><div class="tabfenge"></div>
            </div>
            <div style="clear: both"></div>
        </div>

        <div class="relss layui-hide rel_info_payment_xiangfu_show">
            <div class="table-box tablenes">
                <div class="layui-col-md12" style="border: 1px solid #eee;">
                    <script type="text/html" id="toolbarDemo_payment_xiangfu"><b>项目结算支付</b></script>
                    <table id="datalist_payment_xiangfu" lay-filter="datalist_payment_xiangfu"></table>
                </div>
                <div style="clear: both"></div><div class="tabfenge"></div>
            </div>
            <div style="clear: both"></div>
        </div>

        <div class="relss layui-hide rel_info_xiangfei_show">
            <div class="table-box tablenes">
                <div class="layui-col-md12" style="border: 1px solid #eee;">
                    <script type="text/html" id="toolbarDemo_payment_bao"><b>项目费用报销</b></script>
                    <table id="datalist_payment_bao" lay-filter="datalist_payment_bao"></table>
                </div>
                <div style="clear: both"></div><div class="tabfenge"></div>

                <div class="layui-col-md12" style="border: 1px solid #eee;">
                    <script type="text/html" id="toolbarDemo_payment_xiangfei"><b>项目费用支付</b></script>
                    <table id="datalist_payment_xiangfei" lay-filter="datalist_payment_xiangfei"></table>
                </div>
            </div>
            <div style="clear: both"></div>
        </div>

        <div class="relss layui-hide rel_info_engin_jinghui_show">
            <div class="table-box tablenes">
                <div class="layui-col-md12" style="border: 1px solid #eee;">
                    <script type="text/html" id="toolbarDemo_engin_jinghui"><b>项目经营汇总表</b></script>
                    <table id="datalist_engin_jinghui" lay-filter="datalist_engin_jinghui"></table>
                </div>
                <div style="clear: both"></div><div class="tabfenge"></div>
            </div>
            <div style="clear: both"></div>
        </div>

        <div class="relss layui-hide rel_info_stamp_show">
            <div class="table-box tablenes">
                <div style="clear: both"></div>
                <div class="layui-col-md12" style="border: 1px solid #eee;">
                    <script type="text/html" id="toolbarDemo_engin_stamp"><b>资料盖章</b></script>
                    <table id="datalist_engin_stamp" lay-filter="datalist_engin_stamp"></table>
                </div>
                <div style="clear: both"></div>
                <div class="tabfenge"></div>
                <div class="layui-col-md12" style="border: 1px solid #eee;">
                    <script type="text/html" id="toolbarDemo_engin_stamp_detail"><b>盖章资料明细</b></script>
                    <table id="datalist_engin_stamp_detail" lay-filter="datalist_engin_stamp_detail"></table>
                </div>
            </div>
            <div style="clear: both"></div>
        </div>
    </div>
</div>
<script>
    var param_enginid = getQueryVariable('enginid') || 0;





    layui.use(['form', 'layer', "laytp",'element','dropdown','laypage','table','soulTable'], function() {
        var laypage = layui.laypage, table = layui.table, dropdown = layui.dropdown, form = layui.form, soulTable = layui.soulTable,element = layui.element;


        $("#danbut button").click(function () {
            $(this).addClass('active').siblings().removeClass('active');
            var key = $(this).attr('key');
            var funcname =  'rel_info_'+key;

            $(".relss").addClass('layui-hide');
            $("."+funcname).removeClass('layui-hide');
            eval(funcname+'()');
        });


        rel_info_engin();
        function rel_info_engin (){
            facade.ajax({url: ask_engin_show, data:{id: param_enginid}}).done(function(res){
                if (res.code === 2000) {
                    var data = res.data.data;

                    $("#tong_name").text(data.name);
                    $("#tong_jian_unit").text(data.jian_unit);
                    $("#tong_expectfee").text(parseFormatNum(data.expectfee, 6));
                    $("#tong_shi_money").text(parseFormatNum(data.shimoney)).click(function () {
                        if(res.data.shiinfo){
                            openPage('../contract_shi/show.php?id='+res.data.shiinfo.id, '80%', '80%');
                        }
                    });

                    $("#name").text(data.name);
                    $("#number").text(data.number);
                    $("#lian_unit").text(data.lian_unit);
                    $("#engintype").text(data.engintype);
                    $("#jian_unit").text(data.jian_unit);
                    $("#chanid_name").text(data.chanid_name);
                    $("#areas").text(data.areas);
                    $("#addr").text(data.addr);
                    $("#expectfee").text(data.expectfee);
                    $("#duration").text(data.duration);
                    $("#startdt").text(data.startdt);
                    $("#enddt").text(data.enddt);
                    $("#man_xiang_name").text(data.man_xiang_name);
                    $("#state_name").text(data.state_name);
                    $("#zhaotype").text(data.zhaotype);
                    $("#zhaounit").text(data.zhaounit);
                    $("#actualdt").text(data.actualdt);
                    $("#filishdt").text(data.filishdt);
                    $("#guanrate").text(data.guanrate);
                    $("#jianrate").text(data.jianrate);
                    $("#piaorate").text(data.piaorate);
                    $("#charate").text(data.charate);
                    $("#explain").text(data.explain);

                    if(data.state == 3){
                        $("#actualdtDiv").removeClass('layui-hide');
                    }
                    if(data.state == 6){
                        $("#actualdtDiv").removeClass('layui-hide');
                        $("#filishdtDiv").removeClass('layui-hide');
                    }

                    if(data.bidid > 0){
                        $(".bidinfobut").removeClass('layui-hide');
                        $(".bidinfobut").click(function (e) {
                            openPage('../bid/show.php?id='+data.bidid);
                        });
                    }




                    public_flow_show_display(res.data.billinfo);
                    public_upload_show_file('upload_files', res.data.files);
                    render_from();
                }
            });
            public_get_readsandlog('engin', param_enginid);
        }
        function rel_info_contract_shi_show (){
            var table_contract_shi = table.render({
                elem: "#datalist_contract_shi",url: facade.url(ask_contract_shi_list),where: {enginid:param_enginid}
                , toolbar: '#toolbarDemo_contract_shi', page: true,limit:15,totalRow: true
                ,limit:TabInitShow.limit,soulSort: TabInitShow.soulSort,method: TabInitShow.method, overflow: TabInitShow.overflow
                ,defaultToolbar: ['','', '', ''],filter: TabInitShow.filter ,text: TabInitShow.text
                ,request: TabInitShow.request,response: TabInitShow.response,contextmenu:get_table_contextmenu(soulTable)
                ,parseData: function (res) {
                    return {
                        "code": res.code,
                        "msg": res.message,
                        "count": res.data.data.total,
                        "data": res.data.data.data
                    };
                }
                , cols: [[
                    {type:'numbers',title:'序号',totalRowText: '合计',fixed:'left'}
                    ,{field:'enginname',title:'项目名称',templet: function(d){
                            return '<span class="colorlan" onclick="openPage(\'../engin/show.php?id='+d.enginid+'\')">'+d.enginname+'</span>';
                        }}
                    ,{field: 'engin_chanid_name', title: '项目所属单位'}
                    ,{field:'name',title:'合同名称',templet: function(d){
                            return '<span class="colorlan" onclick="openPage(\'../contract_shi/show.php?id='+d.id+'\')">'+d.name+'</span>';
                        }}
                    ,{field: 'number', title: '合同编号'}
                    ,{field: 'shihetype', title: '合同类型'}
                    ,{field: 'year', title: '合同年份'}
                    ,{field: 'faer', title: '(发包方)甲方'}
                    ,{field: 'chenger_name', title: '承包方(乙方)'}
                    ,{field: 'money', title: '合同金额(元)',totalRow: true}
                    ,{field: 'shimoney', title: '变更后金额(元)',totalRow: true}
                    ,{field: 'shijiemoney', title: '合同结算金额(元)',totalRow: true}
                    ,{field: 'rate', title: '税率(%)'}
                    ,{field: 'startdt', title: '合同开工日期'}
                    ,{field: 'enddt', title: '合同竣工日期'}
                    ,{field: 'duration', title: '工期'}
                    ,{field: 'state_name', title: '合同状态'}
                ]]
                , done: function (res) {
                    element.render();
                    soulTable.render(this);
                }
            });


            var table_contract_shi_jie = table.render({
                elem: "#datalist_contract_shi_jie",url: facade.url(ask_contract_shi_jie_list),where: {enginid:param_enginid}
                , toolbar: '#toolbarDemo_contract_shi_jie', page: true,limit:15,totalRow: true
                ,limit:TabInitShow.limit,soulSort: TabInitShow.soulSort,method: TabInitShow.method, overflow: TabInitShow.overflow
                ,defaultToolbar: ['','', '', ''],filter: TabInitShow.filter ,text: TabInitShow.text
                ,request: TabInitShow.request,response: TabInitShow.response,contextmenu:get_table_contextmenu(soulTable)
                ,parseData: function (res) {
                    return {
                        "code": res.code,
                        "msg": res.message,
                        "count": res.data.data.total,
                        "data": res.data.data.data
                    };
                }
                , cols: [[
                    {type:'numbers',title:'序号',totalRowText: '合计',fixed:'left'}
                    ,{field:'enginname',title:'项目名称',templet: function(d){
                            return '<span class="colorlan" onclick="openPage(\'../engin/show.php?id='+d.enginid+'\')">'+d.enginname+'</span>';
                        }}
                    ,{field: 'engin_chanid_name', title: '项目所属单位'}
                    ,{field: 'jietype_name', title: '结算类型'}
                    ,{field: 'jiedt', title: '结算日期'}
                    ,{field: 'jiefee', title: '本次结算金额(元)',totalRow: true}
                    ,{field: 'koufee', title: '扣款(元)',totalRow: true}
                    ,{field: 'fafee', title: '罚款(元)',totalRow: true}
                    ,{field: 'money', title: '实际结算金额(元)',totalRow: true}
                ]]
                , done: function (res) {
                    element.render();
                    soulTable.render(this);
                }
            });


        }
        function rel_info_contract_cai_show (){
            var table_contract_cai = table.render({
                elem: "#datalist_contract_cai",url: facade.url(ask_contract_cai_list),where: {enginid:param_enginid}
                , toolbar: '#toolbarDemo_contract_cai', page: true,limit:15,totalRow: true
                ,limit:TabInitShow.limit,soulSort: TabInitShow.soulSort,method: TabInitShow.method, overflow: TabInitShow.overflow
                ,defaultToolbar: ['','', '', ''],filter: TabInitShow.filter ,text: TabInitShow.text
                ,request: TabInitShow.request,response: TabInitShow.response,contextmenu:get_table_contextmenu(soulTable)
                ,parseData: function (res) {
                    return {
                        "code": res.code,
                        "msg": res.message,
                        "count": res.data.data.total,
                        "data": res.data.data.data
                    };
                }
                , cols: [[
                    {type:'numbers',title:'序号',totalRowText: '合计',fixed:'left'}
                    ,{field:'enginname',title:'项目名称',templet: function(d){
                            return '<span class="colorlan" onclick="openPage(\'../engin/show.php?id='+d.enginid+'\')">'+d.enginname+'</span>';
                        }}
                    ,{field: 'engin_chanid_name', title: '项目所属单位'}
                    ,{field: 'state_name', title: '合同状态'}
                    ,{field: 'name', title: '合同名称'}
                    ,{field: 'number', title: '合同编号'}
                    ,{field: 'year', title: '合同年份'}
                    ,{field: 'caihetype_name', title: '合同类型'}
                    ,{field: 'caiheshu', title: '合同属性'}
                    ,{field: 'gonger', title: '供应方(乙方)'}
                    ,{field: 'caier_name', title: ' 采购方(甲方)'}
                    ,{field: 'money', title: '合同金额含税(元)',totalRow: true}
                    ,{field: 'bianfee', title: '合同变更(元)',totalRow: true}
                    ,{field: 'caijiemoney', title: '合同结算金额(元)',totalRow: true}
                ]]
                , done: function (res) {
                    element.render();
                    soulTable.render(this);
                }
            });


            var table_contract_cai_jie = table.render({
                elem: "#datalist_contract_cai_jie",url: facade.url(ask_contract_cai_jie_list),where: {enginid:param_enginid}
                , toolbar: '#toolbarDemo_contract_cai_jie', page: true,limit:15,totalRow: true
                ,limit:TabInitShow.limit,soulSort: TabInitShow.soulSort,method: TabInitShow.method, overflow: TabInitShow.overflow
                ,defaultToolbar: ['','', '', ''],filter: TabInitShow.filter ,text: TabInitShow.text
                ,request: TabInitShow.request,response: TabInitShow.response,contextmenu:get_table_contextmenu(soulTable)
                ,parseData: function (res) {
                    return {
                        "code": res.code,
                        "msg": res.message,
                        "count": res.data.data.total,
                        "data": res.data.data.data
                    };
                }
                , cols: [[
                    {type:'numbers',title:'序号',totalRowText: '合计',fixed:'left'}
                    ,{field:'enginname',title:'项目名称',templet: function(d){
                            return '<span class="colorlan" onclick="openPage(\'../engin/show.php?id='+d.enginid+'\')">'+d.enginname+'</span>';
                        }}
                    ,{field: 'engin_chanid_name', title: '项目所属单位'}
                    ,{field:'cainame',title:'采购合同',templet: function(d){
                            return '<span class="colorlan" onclick="openPage(\'../contract_cai/show.php?id='+d.caiid+'\')">'+d.cainame+'</span>';
                        }}
                    ,{field: 'jietype_name', title: '结算类型'}
                    ,{field: 'jiedt', title: '结算日期'}
                    ,{field: 'money', title: '本次结算金额(元)',totalRow: true}
                ]]
                , done: function (res) {
                    element.render();
                    soulTable.render(this);
                }
            });


        }
        function rel_info_piao_show (){
            var table_piao_kai = table.render({
                elem: "#datalist_piao_kai",url: facade.url(ask_piao_kai_list),where: {enginid:param_enginid}
                , toolbar: '#toolbarDemo_piao_kai', page: true,limit:15,totalRow: true
                ,limit:TabInitShow.limit,soulSort: TabInitShow.soulSort,method: TabInitShow.method, overflow: TabInitShow.overflow
                ,defaultToolbar: ['','', '', ''],filter: TabInitShow.filter ,text: TabInitShow.text
                ,request: TabInitShow.request,response: TabInitShow.response,contextmenu:get_table_contextmenu(soulTable)
                ,parseData: function (res) {
                    return {
                        "code": res.code,
                        "msg": res.message,
                        "count": res.data.data.total,
                        "data": res.data.data.data
                    };
                }
                , cols: [[
                    {type:'numbers',title:'序号',totalRowText: '合计',fixed:'left'}
                    ,{field: 'piao_state', title: '开票状态'}
                    ,{field: 'enginname', title: '项目名称'}
                    ,{field: 'engin_chanid_name', title: '项目所属单位'}
                    ,{field: 'number', title: '开票登记单号'}
                    ,{field: 'money', title: '开票金额含税(元)',totalRow: true}
                    ,{field: 'piaotype', title: '发票类型'}
                    ,{field: 'rate', title: '税率(%)'}
                    ,{field: 'ratefee', title: '税额(元)',totalRow: true}
                    ,{field: 'rateshoutype', title: '税费收取方式'}
                    ,{field: 'shuijinfee', title: '税费金额(元)',totalRow: true}
                    ,{field: 'duier', title: '受票单位'}
                    ,{field: 'ratenum', title: '纳税人识别号'}
                    ,{field: 'bankname', title: '开户行'}
                    ,{field: 'banknum', title: '账号'}
                    ,{field: 'unitaddr', title: '地址'}
                    ,{field: 'phone', title: '电话'}
                    ,{field: 'dt', title: '开票日期'}
                    ,{field: 'baner', title: '经手人'}
                ]]
                , done: function (res) {
                    element.render();
                    soulTable.render(this);
                }
            });


            var table_piao_shou = table.render({
                elem: "#datalist_piao_shou",url: facade.url(ask_piao_shou_list),where: {enginid:param_enginid}
                , toolbar: '#toolbarDemo_piao_shou', page: true,limit:15,totalRow: true
                ,limit:TabInitShow.limit,soulSort: TabInitShow.soulSort,method: TabInitShow.method, overflow: TabInitShow.overflow
                ,defaultToolbar: ['','', '', ''],filter: TabInitShow.filter ,text: TabInitShow.text
                ,request: TabInitShow.request,response: TabInitShow.response,contextmenu:get_table_contextmenu(soulTable)
                ,parseData: function (res) {
                    return {
                        "code": res.code,
                        "msg": res.message,
                        "count": res.data.data.total,
                        "data": res.data.data.data
                    };
                }
                , cols: [[
                    {type:'numbers',title:'序号',totalRowText: '合计',fixed:'left'}
                    ,{field: 'enginname', title: '项目名称'}
                    ,{field: 'engin_chanid_name', title: '项目所属单位'}
                    ,{field: 'number', title: '收票登记单号'}
                    ,{field: 'money', title: '收票金额(元)',totalRow: true}
                    ,{field: 'dt', title: '收票日期'}
                    ,{field: 'shouername', title: '收票人'}
                ]]
                , done: function (res) {
                    element.render();
                    soulTable.render(this);
                }
            });


            var table_piao_engin_hui = table.render({
                elem: "#datalist_piao_engin_hui",url: facade.url(ask_piao_engin_hui_list),where: {enginid:param_enginid}
                , toolbar: '#toolbarDemo_piao_engin_hui', page: true,limit:15,totalRow: true
                ,limit:TabInitShow.limit,soulSort: TabInitShow.soulSort,method: TabInitShow.method, overflow: TabInitShow.overflow
                ,defaultToolbar: ['','', '', ''],filter: TabInitShow.filter ,text: TabInitShow.text
                ,request: TabInitShow.request,response: TabInitShow.response,contextmenu:get_table_contextmenu(soulTable)
                ,parseData: function (res) {
                    return {
                        "code": res.code,
                        "msg": res.message,
                        "count": res.data.data.total,
                        "data": res.data.data.data
                    };
                }
                , cols: [[
                    {type:'numbers',title:'序号',totalRowText: '合计',fixed:'left'}
                    ,{field: 'name', title: '项目名称',fixed:'left'}
                    ,{field: 'engin_chanid_name', title: '项目所属单位'}
                    ,{field: 'lian_unit', title: '委托方'}
                    ,{field: 'faer', title: '合同甲方'}
                    ,{field: 'shihemoney', title: '合同金额(元)',align:'right',totalRow: true,event: 'contract_shi',templet: function(d){
                            return '<span class="colorlan">'+parseFormatNum(d.shihemoney)+'</span>';
                        }}
                    ,{field: 'shirate', title: '合同税率(%)'}

                    ,{field: 'gonghuifee', title: '回款金额(元)',totalRow: true,align:'right',event: 'income_engin_gong',templet: function(d){
                            return '<span class="colorlan">'+parseFormatNum(d.gonghuifee)+'</span>';
                        }}
                    ,{field: 'piao_kai_fee', title: '开票金额不含税(元)',align:'right',totalRow: true,event: 'piao_kai_detail',templet: function(d){
                            return '<span class="colorlan">'+parseFormatNum(d.piao_kai_fee)+'</span>';
                        }}
                    ,{field: 'piao_kai_ratefee', title: '销项税额(元)',align:'right',totalRow: true,event: 'piao_kai_detail',templet: function(d){
                            return '<span class="colorlan">'+parseFormatNum(d.piao_kai_ratefee)+'</span>';
                        }}
                    ,{field: 'piao_kai_money', title: '开票金额含税(元)',align:'right',totalRow: true,event: 'piao_kai_detail',templet: function(d){
                            return '<span class="colorlan">'+parseFormatNum(d.piao_kai_money)+'</span>';
                        }}
                    ,{field: 'piao_shou_money', title: '进项票金额含税(元)',align:'right',totalRow: true,event: 'piao_shou_detail',templet: function(d){
                            return '<span class="colorlan">'+parseFormatNum(d.piao_shou_money)+'</span>';
                        }}
                    ,{field: 'piao_shou_ratefee', title: '进项税额(元)',align:'right',totalRow: true,event: 'piao_shou_detail',templet: function(d){
                            return '<span class="colorlan">'+parseFormatNum(d.piao_shou_ratefee)+'</span>';
                        }}

                    ,{field: 'zeng_shui', title: '增值税(元)',align:'right',totalRow: true,templet: function(d){return parseFormatNum(d.zeng_shui);}}
                    ,{field: 'chengjian', title: '城建税(元)',align:'right',totalRow: true,templet: function(d){return parseFormatNum(d.chengjian);}}
                    ,{field: 'jiaofu', title: '教育费附加(元)',align:'right',totalRow: true,templet: function(d){return parseFormatNum(d.jiaofu);}}
                    ,{field: 'dijiao', title: '地方教育费(元)',align:'right',totalRow: true,templet: function(d){return parseFormatNum(d.dijiao);}}

                    ,{field: 'yinhua', title: '销项印花税(元)',align:'right',totalRow: true,templet: function(d){return parseFormatNum(d.yinhua);}}
                    ,{field: 'jinhua', title: '进项印花税(元)',align:'right',totalRow: true,templet: function(d){return parseFormatNum(d.jinhua);}}
                    ,{field: 'shuili', title: '水利基金(元)',align:'right',totalRow: true,templet: function(d){return parseFormatNum(d.shuili);}}
                    ,{field: 'canbao', title: '残保金(元)',align:'right',totalRow: true,templet: function(d){return parseFormatNum(d.canbao);}}
                    ,{field: 'gonghui', title: '工会经费(元)',align:'right',totalRow: true,templet: function(d){return parseFormatNum(d.gonghui);}}
                    ,{field: 'jiaopei', title: '教培费(元)',align:'right',totalRow: true,templet: function(d){return parseFormatNum(d.jiaopei);}}
                    ,{field: 'qisuo', title: '企业所得税(元)',align:'right',totalRow: true,templet: function(d){return parseFormatNum(d.qisuo);}}
                    ,{field: 'allshui', title: '税金合计(元)',align:'right',totalRow: true,templet: function(d){return parseFormatNum(d.allshui);}}

                    ,{field: 'yingshuijinfee', title: '应收税费(元)',align:'right',totalRow: true,event: 'piao_kai',templet: function(d){
                            return '<span class="colorlan">'+parseFormatNum(d.yingshuijinfee)+'</span>';
                        }}
                    ,{field: 'yikoushui', title: '已收税费(元)',align:'right',totalRow: true,event: 'tai_neiming',templet: function(d){
                            return '<span class="colorlan">'+parseFormatNum(d.yikoushui)+'</span>';
                        }}

                    ,{field: 'daikoushui', title: '待收税费(元)',align:'right',totalRow: true,templet: function(d){return parseFormatNum(d.daikoushui);}}
                    ,{field: 'piaorate', title: '应交成本票比例(%)'}
                    ,{field: 'piaorate_money', title: '应提供成本票总额(元)',align:'right',totalRow: true,templet: function(d){return parseFormatNum(d.piaorate_money);}}
                    ,{field: 'yingbupiao', title: '应补成本票(元)',align:'right',totalRow: true,templet: function(d){return parseFormatNum(d.yingbupiao);}}
                    ,{field: 'charate', title: '成本票差额费比例(%)',align:'right',totalRow: true,templet: function(d){return d.charate;}}
                    ,{field: 'chengchafee', title: '成本票差额费(元)',align:'right',totalRow: true,templet: function(d){return parseFormatNum(d.chengchafee);}}
                ]]
                , done: function (res) {
                    element.render();
                    soulTable.render(this);
                }
            });


            table.on('tool(datalist_piao_engin_hui)',function (obj) {
                var data = obj.data;
                if(obj.event === 'contract_shi'){
                    openNavPage('施工合同信息','contract_shi/index.php?enginid='+data.id+'&status=1');
                }
                if(obj.event === 'income_engin_gong'){
                    openNavPage('项目工程回款信息','income_engin/index.php?enginid='+data.id+'&status=1&gongkuan=1');
                }
                if(obj.event === 'piao_kai_detail'){
                    openNavPage('项目开票明细信息','piao_kai/detail.php?enginid='+data.id+'&status=1');
                }
                if(obj.event === 'piao_shou_detail'){
                    openNavPage('项目收票明细信息','piao_shou/detail.php?enginid='+data.id+'&status=1');
                }
                if(obj.event === 'piao_kai'){
                    openNavPage('项目开票信息','piao_kai/index.php?enginid='+data.id+'&status=1');
                }
                if(obj.event === 'tai_neiming'){
                    openNavPage('扣款明细信息','tai_neiming/index.php?enginid='+data.id+'&status=1&feitype='+encodeURI('税费'));
                }

            });
        }
        function rel_info_shoufu_show (){
            var table_income_engin = table.render({
                elem: "#datalist_income_engin",url: facade.url(ask_income_engin_list),where: {enginid:param_enginid}
                , toolbar: '#toolbarDemo_income_engin', page: true,limit:15,totalRow: true
                ,limit:TabInitShow.limit,soulSort: TabInitShow.soulSort,method: TabInitShow.method, overflow: TabInitShow.overflow
                ,defaultToolbar: ['','', '', ''],filter: TabInitShow.filter ,text: TabInitShow.text
                ,request: TabInitShow.request,response: TabInitShow.response,contextmenu:get_table_contextmenu(soulTable)
                ,parseData: function (res) {
                    return {
                        "code": res.code,
                        "msg": res.message,
                        "count": res.data.data.total,
                        "data": res.data.data.data
                    };
                }
                , cols: [[
                    {type:'numbers',title:'序号',totalRowText: '合计',fixed:'left'}
                    ,{field: 'number', title: '收款编号'}
                    ,{field: 'enginname', title: '项目名称'}
                    ,{field: 'engin_chanid_name', title: '项目所属单位'}
                    ,{field: 'money', title: '本次到账金额(元)',totalRow: true}
                    ,{field: 'feitype', title: '款项类型'}
                    ,{field: 'zhai', title: '款项摘要'}
                    ,{field: 'incqing', title: '发票'}
                    ,{field: 'faer', title: '收款对象'}
                    ,{field: 'incdaotype', title: '到账方式'}
                    ,{field: 'dt', title: '到账日期'}
                    ,{field: 'accname', title: '到账账户'}
                    ,{field: 'baner', title: '经办人'}
                ]]
                , done: function (res) {
                    element.render();
                    soulTable.render(this);
                }
            });


            var table_payment_engin = table.render({
                elem: "#datalist_payment_engin",url: facade.url(ask_payment_engin_list),where: {enginid:param_enginid}
                , toolbar: '#toolbarDemo_payment_engin', page: true,limit:15,totalRow: true
                ,limit:TabInitShow.limit,soulSort: TabInitShow.soulSort,method: TabInitShow.method, overflow: TabInitShow.overflow
                ,defaultToolbar: ['','', '', ''],filter: TabInitShow.filter ,text: TabInitShow.text
                ,request: TabInitShow.request,response: TabInitShow.response,contextmenu:get_table_contextmenu(soulTable)
                ,parseData: function (res) {
                    return {
                        "code": res.code,
                        "msg": res.message,
                        "count": res.data.data.total,
                        "data": res.data.data.data
                    };
                }
                , cols: [[
                    {type:'numbers',title:'序号',totalRowText: '合计',fixed:'left'}
                    ,{field:'number',title:'付款编号',templet: function(d){
                            return '<span class="colorlan" onclick="openPage(\'../payment_engin/show.php?id='+d.id+'\')">'+d.number+'</span>';
                        }}
                    ,{field:'enginname',title:'项目名称',templet: function(d){
                            return '<span class="colorlan" onclick="openPage(\'../engin/show.php?id='+d.enginid+'\')">'+d.enginname+'</span>';
                        }}
                    ,{field: 'engin_chanid_name', title: '项目所属单位'}
                    ,{field: 'feitype', title: '款项类型'}
                    ,{field: 'yiju_name', title: '付款依据'}
                    ,{field: 'zhai', title: '款项摘要'}
                    ,{field: 'incqing', title: '发票情况'}
                    ,{field: 'incdaotype', title: '支付方式'}
                    ,{field: 'money', title: '请款金额(元)',totalRow: true}
                    ,{field: 'payfee', title: '已支付(元)',totalRow: true}
                    ,{field: 'gonger', title: '付款对象'}
                    ,{field:'cainame',title:'合同名称',event:"cainame",templet: function (e) {
                            return '<a class="colorlan">'+e.cainame+'</a>';
                        }}
                ]]
                , done: function (res) {
                    element.render();
                    soulTable.render(this);
                }
            });


        }
        function rel_info_payment_neikou_show (){
            var table_payment_neikou = table.render({
                elem: "#datalist_payment_neikou",url: facade.url(ask_payment_neikou_list),where: {enginid:param_enginid}
                , toolbar: '#toolbarDemo_payment_neikou', page: true,limit:15,totalRow: true
                ,limit:TabInitShow.limit,soulSort: TabInitShow.soulSort,method: TabInitShow.method, overflow: TabInitShow.overflow
                ,defaultToolbar: ['','', '', ''],filter: TabInitShow.filter ,text: TabInitShow.text
                ,request: TabInitShow.request,response: TabInitShow.response,contextmenu:get_table_contextmenu(soulTable)
                ,parseData: function (res) {
                    return {
                        "code": res.code,
                        "msg": res.message,
                        "count": res.data.data.total,
                        "data": res.data.data.data
                    };
                }
                , cols: [[
                    {type:'numbers',title:'序号',totalRowText: '合计',fixed:'left'}
                    ,{field:'enginname',title:'项目名称',templet: function(d){
                            return '<span class="colorlan" onclick="openPage(\'../engin/show.php?id='+d.enginid+'\')">'+d.enginname+'</span>';
                        }}
                    ,{field: 'engin_chanid_name', title: '项目所属单位'}
                    ,{field: 'lian_unit', title: '委托方'}
                    ,{field: 'number', title: '扣款编号'}
                    ,{field: 'money', title: '扣款金额(元)',totalRow: true}
                    ,{field: 'dt', title: '核算日期'}
                ]]
                , done: function (res) {
                    element.render();
                    soulTable.render(this);
                }
            });


        }
        function rel_info_payment_xiangfu_show (){
            var table_payment_xiangfu = table.render({
                elem: "#datalist_payment_xiangfu",url: facade.url(ask_payment_xiangfu_list),where: {enginid:param_enginid}
                , toolbar: '#toolbarDemo_payment_xiangfu', page: true,limit:15,totalRow: true
                ,limit:TabInitShow.limit,soulSort: TabInitShow.soulSort,method: TabInitShow.method, overflow: TabInitShow.overflow
                ,defaultToolbar: ['','', '', ''],filter: TabInitShow.filter ,text: TabInitShow.text
                ,request: TabInitShow.request,response: TabInitShow.response,contextmenu:get_table_contextmenu(soulTable)
                ,parseData: function (res) {
                    return {
                        "code": res.code,
                        "msg": res.message,
                        "count": res.data.data.total,
                        "data": res.data.data.data
                    };
                }
                , cols: [[
                    {type:'numbers',title:'序号',totalRowText: '合计',fixed:'left'}
                    ,{field: 'number', title: '结算编号'}
                    ,{field: 'enginname', title: '项目名称'}
                    ,{field: 'engin_chanid_name', title: '项目所属单位'}
                    ,{field: 'zhai', title: '款项摘要'}
                    ,{field: 'jietype', title: '结算类型'}
                    ,{field: 'jiedt', title: '结算日期'}
                    ,{field: 'money', title: '本次实际结算支付(元)',totalRow: true}
                    ,{field: 'explain', title: '备注'}
                ]]
                , done: function (res) {
                    element.render();
                    soulTable.render(this);
                }
            });


        }
        function rel_info_xiangfei_show (){
            var table_payment_bao = table.render({
                elem: "#datalist_payment_bao",url: facade.url(ask_payment_bao_list),where: {enginid:param_enginid}
                , toolbar: '#toolbarDemo_payment_bao', page: true,limit:15,totalRow: true
                ,limit:TabInitShow.limit,soulSort: TabInitShow.soulSort,method: TabInitShow.method, overflow: TabInitShow.overflow
                ,defaultToolbar: ['','', '', ''],filter: TabInitShow.filter ,text: TabInitShow.text
                ,request: TabInitShow.request,response: TabInitShow.response,contextmenu:get_table_contextmenu(soulTable)
                ,parseData: function (res) {
                    return {
                        "code": res.code,
                        "msg": res.message,
                        "count": res.data.data.total,
                        "data": res.data.data.data
                    };
                }
                , cols: [[
                    {type:'numbers',title:'序号',totalRowText: '合计',fixed:'left'}
                    ,{field: 'number', title: '报销编号'}
                    ,{field: 'enginname', title: '项目名称'}
                    ,{field: 'feitype', title: '款项类型'}
                    ,{field: 'zhai', title: '款项摘要'}
                    ,{field: 'incqing', title: '发票情况'}
                    ,{field: 'incdaotype', title: '支付方式'}
                    ,{field: 'shenfee', title: '申请金额(元)',totalRow: true}
                    ,{field: 'isdi', title: '是否冲抵备用金'}
                    ,{field: 'money', title: '实报金额(元)',totalRow: true}
                    ,{field: 'payfee', title: '已支付(元)',totalRow: true}
                    ,{field: 'gonger', title: '付款对象'}
                ]]
                , done: function (res) {
                    element.render();
                    soulTable.render(this);
                }
            });


            var table_payment_xiangfei = table.render({
                elem: "#datalist_payment_xiangfei",url: facade.url(ask_payment_xiangfei_list),where: {enginid:param_enginid}
                , toolbar: '#toolbarDemo_payment_xiangfei', page: true,limit:15,totalRow: true
                ,limit:TabInitShow.limit,soulSort: TabInitShow.soulSort,method: TabInitShow.method, overflow: TabInitShow.overflow
                ,defaultToolbar: ['','', '', ''],filter: TabInitShow.filter ,text: TabInitShow.text
                ,request: TabInitShow.request,response: TabInitShow.response,contextmenu:get_table_contextmenu(soulTable)
                ,parseData: function (res) {
                    return {
                        "code": res.code,
                        "msg": res.message,
                        "count": res.data.data.total,
                        "data": res.data.data.data
                    };
                }
                , cols: [[
                    {type:'numbers',title:'序号',totalRowText: '合计',fixed:'left'}
                    ,{field:'number',title:'付款编号',templet: function(d){
                            return '<span class="colorlan" onclick="openPage(\'../payment_xiangfei/show.php?id='+d.id+'\')">'+d.number+'</span>';
                        }}
                    ,{field:'enginname',title:'项目名称',templet: function(d){
                            return '<span class="colorlan" onclick="openPage(\'../engin/show.php?id='+d.enginid+'\')">'+d.enginname+'</span>';
                        }}
                    ,{field: 'feitype', title: '款项类型'}
                    ,{field: 'zhai', title: '款项摘要'}
                    ,{field: 'incqing', title: '发票情况'}
                    ,{field: 'incdaotype', title: '支付方式'}
                    ,{field: 'money', title: '请款金额(元)',totalRow: true}
                    ,{field: 'payfee', title: '已支付(元)',totalRow: true}
                    ,{field: 'gonger', title: '付款对象'}
                ]]
                , done: function (res) {
                    element.render();
                    soulTable.render(this);
                }
            });


        }
        function rel_info_engin_jinghui_show (){
            var table_engin_jinghui = table.render({
                elem: "#datalist_engin_jinghui",url: facade.url(ask_engin_jinghui_list),where: {enginid:param_enginid}
                , toolbar: '#toolbarDemo_engin_jinghui', page: true,limit:15,totalRow: true
                ,limit:TabInitShow.limit,soulSort: TabInitShow.soulSort,method: TabInitShow.method, overflow: TabInitShow.overflow
                ,defaultToolbar: ['','', '', ''],filter: TabInitShow.filter ,text: TabInitShow.text
                ,request: TabInitShow.request,response: TabInitShow.response,contextmenu:get_table_contextmenu(soulTable)
                ,parseData: function (res) {
                    return {
                        "code": res.code,
                        "msg": res.message,
                        "count": res.data.data.total,
                        "data": res.data.data.data
                    };
                }
                , cols: [[
                    {type:'numbers',title:'序号',totalRowText: '合计',fixed:'left'}
                    ,{field:'name',title:'项目名称',fixed:'left',templet: function(d){
                            return '<span class="colorlan" onclick="openPage(\'../engin/show.php?id='+d.id+'\')">'+d.name+'</span>';
                        }}
                    ,{field: 'chanid_name', title: '项目所属单位'}
                    ,{field: 'number', title: '项目编号'}
                    ,{field: 'state_name', title: '项目状态'}
                    ,{field: 'lian_unit', title: '委托方'}

                    ,{field:'shibumoney',title:'施工合同金额含变更(元)',totalRow: true,align:'right',event: 'contract_shi',templet: function(d){
                            return '<span class="colorlan">'+parseFormatNum(d.shibumoney)+'</span>';
                        }}
                    ,{field:'shijiemoney',title:'施工合同结算金额(元)',totalRow: true,align:'right',event: 'contract_shi_jie',templet: function(d){
                            return '<span class="colorlan">'+parseFormatNum(d.shijiemoney)+'</span>';
                        }}
                    ,{field: 'lei_piaokai', title: '累计开票金额(元)',totalRow: true,align:'right',event: 'piao_kai',templet: function(d){
                            return '<span class="colorlan">'+parseFormatNum(d.lei_piaokai)+'</span>';
                        }}
                    ,{field: 'incomeenginfee', title: '累计收款金额(元)A',totalRow: true,align:'right',event: 'income_engin',templet: function(d){
                            return '<span class="colorlan">'+parseFormatNum(d.incomeenginfee)+'</span>';
                        }}
                    ,{field: 'gonghuifee', title: '其中工程回款金额(元)',totalRow: true,align:'right',event: 'income_engin_gong',templet: function(d){
                            return '<span class="colorlan">'+parseFormatNum(d.gonghuifee)+'</span>';
                        }}
                    ,{field: 'weilaifee', title: '其中委托方来款金额(元)',totalRow: true,align:'right',event: 'income_engin_wei',templet: function(d){
                            return '<span class="colorlan">'+parseFormatNum(d.weilaifee)+'</span>';
                        }}


                    ,{field:'caimoney',title:'采购合同金额含变更(元)',totalRow: true,align:'right',event: 'contract_cai',templet: function(d){
                            return '<span class="colorlan">'+parseFormatNum(d.caimoney)+'</span>';
                        }}
                    ,{field:'caijiemoney',title:'采购合同结算金额(元)',totalRow: true,align:'right',event: 'contract_cai_jie',templet: function(d){
                            return '<span class="colorlan">'+parseFormatNum(d.caijiemoney)+'</span>';
                        }}
                    ,{field: 'piaoshoufee', title: '累计收票金额(元)',totalRow: true,align:'right',event: 'piao_shou',templet: function(d){
                            return '<span class="colorlan">'+parseFormatNum(d.piaoshoufee)+'</span>';
                        }}


                    ,{field: 'payenginfee', title: '累计付款(元) B',totalRow: true,align:'right',event: 'payment_engin',templet: function(d){
                            return '<span class="colorlan">'+parseFormatNum(d.payenginfee)+'</span>';
                        }}
                    ,{field: 'neikoufee', title: '累计扣款(元) C',totalRow: true,align:'right',event: 'tai_neiming',templet: function(d){
                            return '<span class="colorlan">'+parseFormatNum(d.neikoufee)+'</span>';
                        }}
                    ,{field: 'payment_xiangfu', title: '累计结算支付(元) D',totalRow: true,align:'right',event: 'payment_xiangfu',templet: function(d){
                            return '<span class="colorlan">'+parseFormatNum(d.payment_xiangfu)+'</span>';
                        }}
                    ,{field: 'balance', title: '项目余额(元) A-B-C-D',totalRow: true,align:'right',templet: function(d){
                            return '<span>'+parseFormatNum(d.balance)+'</span>';
                        }}
                    ,{field: 'leikoudai', title: '累计待扣(元)',totalRow: true,align:'right',event: 'engin_kou',templet: function(d){
                            return '<span class="colorlan">'+parseFormatNum(d.leikoudai)+'</span>';
                        }}
                    ,{field: 'shengjiefee', title: '项目可用余额(元)',totalRow: true,align:'right',templet: function(d){
                            return '<span>'+parseFormatNum(d.shengjiefee)+'</span>';
                        }}
                ]]
                , done: function (res) {
                    element.render();
                    soulTable.render(this);
                }
            });

            table.on('tool(datalist_engin_jinghui)',function (obj) {
                var data = obj.data;
                if(obj.event === 'contract_shi'){
                    openNavPage('施工合同信息','contract_shi/index.php?enginid='+data.id+'&status=1');
                }
                if(obj.event === 'contract_shi_jie'){
                    openNavPage('施工合同结算信息','contract_shi_jie/index.php?enginid='+data.id+'&status=1');
                }
                if(obj.event === 'piao_kai'){
                    openNavPage('开票信息','piao_kai/index.php?enginid='+data.id+'&status=1');
                }
                if(obj.event === 'income_engin'){
                    openNavPage('项目收款信息','income_engin/index.php?enginid='+data.id+'&status=1');
                }
                if(obj.event === 'income_engin_gong'){
                    openNavPage('项目工程回款信息','income_engin/index.php?enginid='+data.id+'&status=1&gongkuan=1');
                }
                if(obj.event === 'income_engin_wei'){
                    openNavPage('项目委托方来款信息','income_engin/index.php?enginid='+data.id+'&status=1&gongkuan=2');
                }


                if(obj.event === 'contract_cai'){
                    openNavPage('采购合同信息','contract_cai/index.php?enginid='+data.id+'&status=1');
                }
                if(obj.event === 'contract_cai_jie'){
                    openNavPage('采购合同结算信息','contract_cai_jie/index.php?enginid='+data.id+'&status=1');
                }
                if(obj.event === 'piao_shou'){
                    openNavPage('收票信息','piao_shou/index.php?enginid='+data.id+'&status=1');
                }


                if(obj.event === 'payment_engin'){
                    openNavPage('项目付款信息','payment_engin/index.php?enginid='+data.id+'&status=1');
                }
                if(obj.event === 'tai_neiming'){
                    openNavPage('扣款登记明细信息','tai_neiming/index.php?enginid='+data.id+'&status=1');
                }
                if(obj.event === 'payment_xiangfu'){
                    openNavPage('累计结算支付','payment_xiangfu/index.php?enginid='+data.id+'&status=1');
                }
                if(obj.event === 'engin_kou'){
                    openNavPage('应扣费用表','engin_kou/index.php?enginid='+data.id+'&status=1');
                }


            });

        }
        function rel_info_stamp_show (){
            var table_engin_stamp = table.render({
                elem: "#datalist_engin_stamp",url: facade.url(ask_engin_stamp_list),where: {enginid:param_enginid}
                , toolbar: '#toolbarDemo_engin_stamp', page: true,limit:15
                ,limit:TabInitShow.limit,soulSort: TabInitShow.soulSort,method: TabInitShow.method, overflow: TabInitShow.overflow
                ,defaultToolbar: ['','', '', ''],filter: TabInitShow.filter ,text: TabInitShow.text
                ,request: TabInitShow.request,response: TabInitShow.response,contextmenu:get_table_contextmenu(soulTable)
                ,parseData: function (res) {
                    return {
                        "code": res.code,
                        "msg": res.message,
                        "count": res.data.data.total,
                        "data": res.data.data.data
                    };
                }
                , cols: [[
                    {type:'numbers',title:'序号',fixed:'left'}
                    ,{field:'enginname',title:'项目名称',templet: function(d){
                            return '<span class="colorlan" onclick="openPage(\'../engin/show.php?id='+d.enginid+'\')">'+d.enginname+'</span>';
                        }}
                    ,{field: 'engin_chanid_name', title: '项目所属单位'}
                    ,{field: 'isgai_name', title: '盖章状态'}
                    ,{field: 'zitype', title: '资料类型'}
                    ,{field: 'nums', title: '盖章份数'}
                    ,{field: 'flowuser', title: '申请人'}
                    ,{field: 'flowdept', title: '申请部门'}
                    ,{field: 'created_at', title: '申请时间'}
                ]]
                , done: function (res) {
                    soulTable.render(this);
                }
            });
            var table_engin_stamp_detail = table.render({
                elem: "#datalist_engin_stamp_detail",url: facade.url(ask_engin_stamp_detail_list),where: {enginid:param_enginid}
                , toolbar: '#toolbarDemo_engin_stamp_detail', page: true,limit:15
                ,limit:TabInitShow.limit,soulSort: TabInitShow.soulSort,method: TabInitShow.method, overflow: TabInitShow.overflow
                ,defaultToolbar: ['','', '', ''],filter: TabInitShow.filter ,text: TabInitShow.text
                ,request: TabInitShow.request,response: TabInitShow.response,contextmenu:get_table_contextmenu(soulTable)
                ,parseData: function (res) {
                    return {
                        "code": res.code,
                        "msg": res.message,
                        "count": res.data.data.total,
                        "data": res.data.data.data
                    };
                }
                , cols: [[
                    {type:'numbers',title:'序号',fixed:'left'}
                    ,{field:'enginname',title:'项目名称',templet: function(d){
                            return '<span class="colorlan" onclick="openPage(\'../engin/show.php?id='+d.enginid+'\')">'+d.enginname+'</span>';
                        }}
                    ,{field: 'engin_chanid_name', title: '项目所属单位'}
                    ,{field: 'name', title: '资料文件名称'}
                    ,{field: 'yongtype', title: '用章类型'}
                    ,{field: 'num', title: '盖章份数'}
                    ,{field: 'flowuser', title: '申请人'}
                    ,{field: 'created_at', title: '申请日期'}
                    ,{field: 'gaidt', title: '盖章日期'}
                    ,{field: 'gaier', title: '盖章人'}
                    ,{field: 'isfan', title: '是否需返还'}
                    ,{field: 'fandt', title: '返还日期'}
                    ,{field: 'jieer', title: '接收人'}
                ]]
                , done: function (res) {
                    soulTable.render(this);
                }
            });
        }


    });



</script>
</body>
</html>




